#ifndef _TEST_H_
#define _TEST_H_

#include <misc.h>
#include <SDL/SDL.h>

const int MAX_NAME_SIZE = 128;
enum ActionType
{
    ACTION_MOVE,
    ACTION_SHOW,
    ACTION_HIDE,
    ACTION_FADE_IN,
    ACTION_FADE_OUT,
    ACTION_SETCOLOR,
    ACTION_SETTEXT
};
struct ActionNode
{
    Uint32 timestamp;
    char objectID[MAX_NAME_SIZE];
    enum ActionType type;
    Uint32 duration;
    union {
        struct {
            Sint16 x, y;
        }point;
        const char *str;
        struct {
            Uint8 r, g, b;
        }color;
    }param;
};

void action_add_show(misc::SimpleList<ActionNode *> *actionlist,
                const char *objid, Uint32 timestamp);
void action_add_hide(misc::SimpleList<ActionNode *> *actionlist,
                const char *objid, Uint32 timestamp);
void action_add_move(misc::SimpleList<ActionNode *> *actionlist,
                const char *objid, Uint32 timestamp,
                Uint32 duration, Sint16 x, Sint16 y);
void action_add_fadein(misc::SimpleList<ActionNode *> *actionlist,
                const char *objid, Uint32 timestamp, Uint32 duration);
void action_add_fadeout(misc::SimpleList<ActionNode *> *actionlist,
                const char *objid, Uint32 timestamp, Uint32 duration);
void action_add_setcolor(misc::SimpleList<ActionNode *> *actionlist,
                const char *objid, Uint32 timestamp, Uint8 r, Uint8 g, Uint8 b);
void action_add_settext(misc::SimpleList<ActionNode *> *actionlist,
                const char *objid, Uint32 timestamp, const char *str);
#endif
